package com.ssh.service;

import com.ssh.dao.DeptDAO;
import com.ssh.pojo.Dept;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class DeptService {
    @Autowired
    private DeptDAO deptDAO;

    //添加部门
    public void addDept(Dept dept) {
        deptDAO.addDept(dept);
    }

    //查询所有部门
    public List<Dept> getDeptList() {
        return deptDAO.getDeptList();
    }
}
